
<?php
    $selected_country = isset($selected_country)?$selected_country:1; 
    $selected_country_setting = array(
        'table_name' => 'geo_countries',
        'key_field' => 'id',
        'value_field' => 'name'
    );
    $selected_cat = isset($selected_cat)?$selected_cat:1; 
    $selected_cat_setting = array(
        'table_name' => 'categories',
        'key_field' => 'id',
        'value_field' => 'nomfr',
        'where' =>array('parent >' => 0)
    );
?>
<div id="wrapper-content">    
<?php echo form_open_multipart('product/add_new_animal')?>
 <div id="viewactu" align="center"> 
 <div align="center" id="titre_viewactu" >AJOUTER ANIMAL</div>
<table id="formactu" cellpadding="10px" cellspacing="0">
    <tr>
        <td><label for="name">Nom </label></td>
        <td><input type="text" size="50" name="txtAnimalName" value="<?php echo set_value('txtAnimalName')?>"></td>
        <td><?php echo form_error('txtAnimalName');?></td>
    </tr>
    <tr>
        <td><label for="cat">Cat&eacute;gorie</label></td>
        <td><?php echo form_dropdown('categorie',dropdown_data($selected_cat_setting),$selected_cat)?></td>
        <td></td>
    </tr>
    <tr>
        <td><label for="cat">Origine</label></td>
        <td><?php echo form_dropdown('origine',dropdown_data($selected_country_setting),$selected_country)?></td>
        <td></td>
    </tr>
    <tr><?php $price = isset ($animal_price)?$animal_price:0;?>
        <td>Prix</td>
        <td><input type="text" size="50" name="txtPrice" value="<?php echo $price?>"></td>
        <td><?php echo form_error('txtPrice');?></td>
    </tr>
    <tr>
        <td>Quantit&eacute;</td>
        <td><input type="text" size="50" name="txtQuantity" value="<?php echo set_value('txtQuantity')?>"></td>
    </tr>
    <tr>
        <td>Image</td>
        <td><input type="file" name="userfile" size="20"><?php if(isset($error)) echo $error;?></td>
    </tr>
    <tr>
        <td valign="top"><a href="#" id="frDesLink">Description(Francais)</a></td>
        <td colspan="2">
            <div class="fckFrenchEditor" style="display: none;border: 1px solid;">
                <?php
                        $data = array('name' => 'txtFrDes',
                        'id' => 'txtDes',
                        'width' => '400',
                        'height' => '250');
                        echo form_fckeditor($data);
                ?>
            </div>
        </td>
    </tr>
    <tr>
        <td valign="top"><a href="#" id="enDesLink">Description(Anglais)</a></td>
        <td colspan="2">
            <div class="fckEnglishEditor" style="display: none;border: 1px solid;">
                <?php
                        $data = array('name' => 'txtEnDes',
                        'id' => 'txtDes',
                        'width' => '400',
                        'height' => '250');
                        echo form_fckeditor($data);
                ?>
            </div>
        </td>
    </tr>
    <tr>
        <td valign="top"><a href="#" id="spDesLink">Description(Espagnol)</a></td>
        <td colspan="2">
            <div class="fckSpanishEditor" style="display: none;border: 1px solid;">
                <?php
                        $data = array('name' => 'txtSpDes',
                        'id' => 'txtDes',
                        'width' => '400',
                        'height' => '250');
                        echo form_fckeditor($data);
                ?>
            </div>
        </td>
    </tr>
    <tr>
        <td valign="top"><a href="#" id="germanDesLink">Description(Allemagne)</a></td>
        <td colspan="2">
            <div class="fckGermanEditor" style="display: none;border: 1px solid;">
                <?php
                        $data = array('name' => 'txtGeDes',
                        'id' => 'txtDes',
                        'width' => '400',
                        'height' => '250');
                        echo form_fckeditor($data);
                ?>
            </div>
        </td>
    </tr>
     <tr>
        <td valign="top"><a href="#" id="dutchDesLink">Description(Holland)</a></td>
        <td colspan="2">
            <div class="fckDutchEditor" style="display: none;border: 1px solid;">
                <?php
                        $data = array('name' => 'txtDuctchDes',
                        'id' => 'txtDes',
                        'width' => '400',
                        'height' => '250');
                        echo form_fckeditor($data);
                ?>
            </div>
        </td>
    </tr>
    <tr>
    <td></td> 
        <td><input type="submit" name="submit" value="Ajouter"/a></td>
        </td>
    </tr>
    
</table>
</form>
</div>
</div>